Push Channel | Supported Type | Use Requirements |
Huawei | Thumbnail | Only HTTPS URLs are supported. Format requirements: PNG , JPG , and JPEG 120 x 120 px. The image will be automatically resized if its width or height exceeds 120 px. Less than 200 KB |
Mi | Large image | Only HTTPS URLs are supported. Format requirements: PNG , JPG , and JPEG Fixed at 876 x 324 px Less than 1 MB Note: to use the large image notification feature in the Mi channel, you need to first call the image upload API of Mi to upload the image file, get the image address pic_url specified by Mi, and enter it in the corresponding Tencent Push Notification Service push parameter xg_media_resources . For more information, see the large image upload API description in here. |
Tencent Push Notification Service | Large image, thumbnail, and audio | Android platform: Only HTTPS URLs are supported. Image format requirements: JPEG , JPG , and PNG The height of a large image cannot exceed 324 px and the width is adaptive. The size of a thumbnail should be 120 x 120 px. If its height or width exceeds 120 px, it will be cropped into a square. Audio file format requirements: an audio file cannot exceed 5 MB. iOS platform: the requirements are the same as that of the APNs channel. |
APNs | Thumbnail and audio/video | Only HTTPS URLs are supported. Image format requirements: JPEG , PNG , and GIF formatsLess than 10 MB Audio/Video file format requirements: Video encoding formats: MPEG , MPEG-2 Video , MPEG-4 , and AVI Audio file extensions: AIFF , WAV , and CAF Audio encoding formats: Linear PCM , MA4 (IMA/ADPCM) , alaw , and μLaw An audio/video file should be less than 5 MB. An audio file should be less than 30s long. Note: image and audio/video cannot be enabled at the same time. |
PNG
, JPG
, or JPEG
; 120 × 120 px; less than 200 KBPNG
, JPG
, or JPEG
; 876 x 324 px; less than 1 MBPNG
, JPG
, JPEG
, or GIF
format.MPEG
, MPEG-2 Video
, MPEG-4
, or AVI
format.Push
API:Platform | Parameter | Notes |
Android | Thumbnail: icon_res, icon_type Large image: xg_media_resources Audio: xg_media_audio_resources | Thumbnails are supported only for the Tencent Push Notification Service and Huawei channels. Large images are supported only for the Tencent Push Notification Service and Mi channels. Audios are supported only for the Tencent Push Notification Service channel. |
iOS | Image and audio/video: xg_media_resources | Notification Image and Notification Audio/Video cannot be enabled at the same time. |
{"audience_type": "token","token_list": ["05da87c0ae******2dfa9e08d884aada5bb2"],"message_type": "notify","multi_pkg":true,"message": {"Title": "Push title","content": "Push content","xg_media_resources": "xxx1" , // Enter the URL of the rich media element, such as `https://www.xx.com/img/bd_logo1.png?qua=high`."xg_media_audio_resources":"xxx", // Enter the URL of the audio, such as `https://sc1.111ttt.cn/2018/1/03/13/396131227447.mp3`."android": {"icon_type": 1,"icon_res": "xxx", // Enter the URL of the thumbnail."custom_content":"{\\"key\\":\\"value\\"}"}}}
Was this page helpful?